import 'package:flutter/material.dart';
import '../../utils/resability.dart';

class ProfilePage extends StatelessWidget {
  ProfilePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: bg_color_light,
      appBar: AppBar(
        backgroundColor: bg_color_light,
        title: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            IconButton(
              onPressed: () {},
              icon: Icon(Icons.menu, color: Colors.white.withAlpha(0)),
            ),
            Text('我的', style: TextStyle(color: Colors.white, fontSize: 20)),
            IconButton(
              onPressed: () {},
              icon: Icon(Icons.settings, color: Colors.white),
            ),
          ],
        ),
      ),
      body: SingleChildScrollView(
        child: Container(
          padding: EdgeInsets.all(30),
          child: Column(
            children: [
              // 头像
              Row(
                mainAxisAlignment: MainAxisAlignment.start,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  ClipRRect(
                    borderRadius: BorderRadius.circular(60),
                    child: Image.asset(
                      'assets/images/zuozhe/zuojia2.png',
                      width: 120,
                      height: 120,
                    ),
                  ),
                  SizedBox(width: 30),
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      SizedBox(height: 10),
                      Text(
                        '郭栋',
                        style: TextStyle(fontSize: 25, color: Colors.white),
                      ),
                      Text(
                        '山东•日照',
                        style: TextStyle(fontSize: 15, color: text_color_light),
                      ),
                    ],
                  ),
                ],
              ),
              Container(
                width: double.infinity,
                height: 86,
                margin: EdgeInsets.fromLTRB(0, 20, 0, 20),
                padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(10),
                  color: const Color.fromARGB(255, 57, 66, 78),
                ),
                child: Stack(
                  alignment: Alignment.center,
                  children: [
                    Row(
                      mainAxisAlignment: MainAxisAlignment.spaceAround,
                      children: [
                        Flexible(
                          flex: 1,
                          child: TextButton(
                            onPressed: () {},
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: [
                                Text(
                                  '1233',
                                  style: TextStyle(
                                    fontSize: 20,
                                    color: Colors.white,
                                  ),
                                ),
                                Text(
                                  '关注',
                                  style: TextStyle(
                                    fontSize: 15,
                                    color: text_color_light,
                                  ),
                                ),
                              ],
                            ),
                          ),
                        ),

                        Flexible(
                          flex: 1,
                          child: TextButton(
                            onPressed: () {},
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: [
                                Text(
                                  '3345',
                                  style: TextStyle(
                                    fontSize: 20,
                                    color: Colors.white,
                                  ),
                                ),
                                Text(
                                  '粉丝',
                                  style: TextStyle(
                                    fontSize: 15,
                                    color: text_color_light,
                                  ),
                                ),
                              ],
                            ),
                          ),
                        ),

                        Flexible(
                          flex: 1,
                          child: TextButton(
                            onPressed: () {},
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: [
                                Text(
                                  '5434',
                                  style: TextStyle(
                                    fontSize: 20,
                                    color: Colors.white,
                                  ),
                                ),
                                Text(
                                  '喜欢',
                                  style: TextStyle(
                                    fontSize: 15,
                                    color: text_color_light,
                                  ),
                                ),
                              ],
                            ),
                          ),
                        ),
                      ],
                    ),
                    Row(
                      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                      children: [
                        Container(width: 1, height: 50, color: text_color),
                        Container(width: 1, height: 50, color: text_color),
                      ],
                    ),
                  ],
                ),
              ),
              ListTile(
                title: Text(
                  '个人信息',
                  style: TextStyle(fontSize: 15, color: Colors.white),
                ),
                contentPadding: EdgeInsets.fromLTRB(15, 5, 15, 5),

                trailing: Icon(
                  Icons.arrow_forward_ios,
                  color: Colors.white,
                  size: 15,
                ),
              ),
              Divider(height: 1, color: const Color.fromARGB(255, 67, 67, 78)),
              ListTile(
                title: Text(
                  '我的评论',
                  style: TextStyle(fontSize: 15, color: Colors.white),
                ),
                contentPadding: EdgeInsets.fromLTRB(15, 5, 15, 5),
                trailing: Icon(
                  Icons.arrow_forward_ios,
                  color: Colors.white,
                  size: 15,
                ),
              ),
              Divider(height: 1, color: const Color.fromARGB(255, 67, 67, 78)),
              ListTile(
                title: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '我的消息',
                      style: TextStyle(fontSize: 15, color: Colors.white),
                    ),
                    Container(
                      alignment: Alignment.center,
                      constraints: BoxConstraints(minWidth: 18),
                      decoration: BoxDecoration(
                        color: button_color,
                        borderRadius: BorderRadius.circular(30),
                      ),
                      child: Text(
                        '4',
                        style: TextStyle(fontSize: 12, color: Colors.white),
                      ),
                    ),
                  ],
                ),
                contentPadding: EdgeInsets.fromLTRB(15, 5, 15, 5),

                trailing: Icon(
                  Icons.arrow_forward_ios,
                  color: Colors.white,
                  size: 15,
                ),
              ),
              Divider(height: 1, color: const Color.fromARGB(255, 67, 67, 78)),
              ListTile(
                title: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '账户余额',
                      style: TextStyle(fontSize: 15, color: Colors.white),
                    ),

                    Text(
                      '1424.00',
                      style: TextStyle(fontSize: 15, color: button_color),
                    ),
                  ],
                ),

                contentPadding: EdgeInsets.fromLTRB(15, 5, 15, 5),
                trailing: Icon(
                  Icons.arrow_forward_ios,
                  color: Colors.white,
                  size: 15,
                ),
              ),
              Divider(height: 1, color: const Color.fromARGB(255, 67, 67, 78)),
            ],
          ),
        ),
      ),
    );
  }
}
